Trac is being migrated to new services! Issues can be found in our new
YouTrack instance and WIKI pages can be found on our
website.
- Timestamp:
-
Apr 28, 2007, 1:45:55 AM (17 years ago)
- Author:
-
John Bailey
- Comment:
-
Typo, grammar, and quoting fixes
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v7
|
v8
|
|
1 | | == There needs to be an easy way to linkify the functions names below to our doxygen documentations. == |
2 | | |
3 | 1 | = ["Development FAQ"] = |
| 2 | The following is a list of Frequently Asked Questions (FAQs), with answers, and notes related to development using !LibPurple. (Note for developers: There needs to be an easy way to linkify the functions names below to our doxygen documentations. |
4 | 3 | |
5 | 4 | [[TOC(inline,noheading)]] |
6 | 5 | |
7 | 6 | == Accounts == |
8 | | === I created an account. But it's not being saved. === |
9 | | You need to use purple_accounts_add to add the account to the list of available accounts. This list of accounts is saved. Note that many of the functions require an account to be on that list. So you should always call purple_accounts_add after creating an account. |
| 7 | === I created an account, but it's not being saved! === |
| 8 | You need to use `purple_accounts_add()` to add the account to the list of available accounts. This list of accounts is saved. Note that many of the functions require an account to be on that list. So you should always call `purple_accounts_add()` after creating an account. |
10 | 9 | |
11 | 10 | === How do I get online with an account? === |
12 | 11 | There are two ways you can do this: |
13 | | * If you have other accounts online, and you want the new account to have the same status as those, then call purple_savedstatus_get_current to get the current status, and use gaim_savedstatus_activate_for_account for the account. |
14 | | * Otherwise, you can simply do purple_account_set_status to set the status of the account. |
15 | | An account needs to be enabled before it can be connected. So after doing either of the above, you need to enable the account by calling purple_account_set_enabled. |
| 12 | * If you have other accounts online, and you want the new account to have the same status as those, then call `purple_savedstatus_get_current()` to get the current status, and use `purple_savedstatus_activate_for_account()` for the account. |
| 13 | * Otherwise, you can simply do `purple_account_set_status()` to set the status of the account. |
| 14 | An account needs to be enabled before it can be connected. So after doing either of the above, you need to enable the account by calling `purple_account_set_enabled()`. |
16 | 15 | |
17 | 16 | |
18 | 17 | == Conversations == |
19 | 18 | === How can I create a conversation with someone? === |
20 | | Use purple_conversation_new. Use PURPLE_CONV_TYPE_IM if the conversation is an IM (one-to-one person conversation), and use PURPLE_CONV_TYPE_CHAT if it's a multi-user conversation. One important thing to note here is that the name-property of the PurpleConversation struct is the name of the buddy you are creating a conversation with (the documentation states that this is the name of the conversation itself, but it is in fact also the name of the receiver buddy). So a call to purple_conversation_new takes the name of the buddy as its third argument. |
| 19 | Use `purple_conversation_new()`. Use `PURPLE_CONV_TYPE_IM` if the conversation is an IM (one-to-one person conversation), and use `PURPLE_CONV_TYPE_CHAT` if it's a multi-user conversation. One important thing to note here is that the name property of the `PurpleConversation` struct is the name of the buddy you are creating a conversation with (the documentation states that this is the name of the conversation itself, but it is in fact also the name of the receiving buddy). So a call to `purple_conversation_new()` takes the name of the buddy as its third argument. |
21 | 20 | |
22 | 21 | === How can I send a message in a conversation? === |
23 | | Use either purple_conv_im_send or purple_conv_chat_send. Note that the first parameter to either of these functions are '''not''' the conversation itself. Rather, it's the im-data/chat-data of the conversation which you can get from PURPLE_CONV_IM/PURPLE_CONV_CHAT. |
| 22 | Use either `purple_conv_im_send()` or `purple_conv_chat_send()`. Note that the first parameter to either of these functions are '''not''' the conversation itself. Rather, it's the IM data or chat data of the conversation which you can get from `PURPLE_CONV_IM`/`PURPLE_CONV_CHAT`. |
24 | 23 | |
25 | 24 | === Is there a way that I can print something in the conversation window, but not send the message? === |
26 | | Yes. Use purple_conv_im_write/purple_conv_chat_write. |
| 25 | Yes. Use `purple_conv_im_write()` or `purple_conv_chat_write()`. |
27 | 26 | |
28 | 27 | == Files and File Paths == |
… |
… |
|
49 | 48 | |
50 | 49 | === Should I use `snprintf()` or `vsnprintf()`? === |
51 | | No. Use the GLib wrapper functions instead. They are `g_snprintf()` and `g_vsnprintf`. |
| 50 | No. Use the GLib wrapper functions instead. They are `g_snprintf()` and `g_vsnprintf()`. |
52 | 51 | |
53 | 52 | === How do I get the settings directory? === |
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!